import java.util.Arrays;

/**
 * @USER: Administrator
 * @DATE: 2024/9/15 下午4:50
 * @VERSION: 1.0.0
 */
public class LC1491 {
    public static void main(String[] args) {

    }

    public double average(int[] salary) {
        Arrays.sort(salary);
        salary[0] = 0;
        salary[salary.length - 1] = 0;
        int sum = 0;
        for (int i = 0; i < salary.length - 1; i++) {
            sum += salary[i];
        }

        return sum *1.0 /(salary.length - 2);
    }

}
